<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>:first-child - 匹配了第一个 p 元素</title>
    <style>
        p:first-child {
            color: blue;
        }
    </style>
</head>

<body>
    <p>This is some text.</p>
    <p>This is some text.</p>
    <p><b>注意:</b>对于 :first-child 工作于 IE8 以及更早版本的浏览器, ！DOCTYPE 必须已经声明.</p>
</body>

</html>